import pymysql

cxk = pymysql.connect(host='localhost', port=3306, user='root', password='root', database='class_db', charset='utf8')
taimei = cxk.cursor(pymysql.cursors.SSDictCursor)
'''
taimei = cxk.cursor()
<class 'tuple'>
<class 'tuple'>
taimei = cxk.cursor(pymysql.cursors.DictCursor)
<class 'dict'>
<class 'list'>
taimei = cxk.cursor(pymysql.cursors.SSCursor)
<class 'list'>
<class 'list'>
taimei = cxk.cursor(pymysql.cursors.SSDictCursor)
<class 'list'>
<class 'list'>
'''
taimei.execute('select * from student')
fs = taimei.fetchone()
print(fs)
print(taimei.rownumber)
# taimei.scroll(0,mode='absolute')
taimei.rownumber = 2
print(taimei.rownumber)
pf = taimei.fetchall()
print(taimei.rownumber)
print(pf)
taimei.close()
cxk.close()
